home *** CD-ROM | disk | FTP | other *** search
/ Armageddon - Interactive Preview / Interactive Preview: Armageddon.iso / pc / control.dxr / Scripts & Behaviors_2_MovieScript 1.ls < prev    next >
Encoding:
Text File  |  1998-05-19  |  3.2 KB  |  129 lines

  1. global gCommObj, gMonitorObj, gGameScreen, gBioValue, gDisplayObj, gSoundLevel, gLastSound, gTimer, gScrollerObj, gCountEnd
  2.  
  3. on startMovie
  4.   preLoad()
  5.   startTimer()
  6.   set the colorDepth to 16
  7.   set the floatPrecision to 5
  8.   set gBioValue to 0
  9.   set the soundLevel to 7
  10.   set gSoundLevel to 146
  11.   set gDisplayObj to new(script "aDisplayObj", 112)
  12.   set gCommObj to new(script "aCommObj", 19, 20, 21)
  13.   set gMonitorObj to new(script "aMonitorObj", 23, 24, 25)
  14.   set gGameScreen to 14
  15.   startTimer()
  16.   set gTimer to the timer
  17.   set gScrollerObj to new(script "aScrollerObj", 70, 71, 72, 24)
  18.   set gCountEnd to 0
  19. end
  20.  
  21. on keyUp
  22.   if the visible of sprite 24 = 1 then
  23.     case the keyPressed of
  24.       "N":
  25.         set the visible of sprite 75 to 0
  26.         set the visible of sprite 76 to 0
  27.         updateStage()
  28.         ResetMonitors(gMonitorObj)
  29.         setLeft(gMonitorObj, "Galaxy Loop")
  30.         setCenter(gMonitorObj, "Impact Loop")
  31.         setRight(gMonitorObj, "Still Loop")
  32.         updateStage()
  33.       "Y":
  34.         set the visible of sprite 75 to 0
  35.         set the visible of sprite 76 to 0
  36.         set the visible of sprite 111 to 0
  37.         set the member of sprite 24 to "Abort Text"
  38.         updateStage()
  39.         runCountdown()
  40.     end case
  41.   end if
  42. end
  43.  
  44. on runCountdown
  45.   setLeft(gMonitorObj, "Left Main")
  46.   setRight(gMonitorObj, "Right Main")
  47.   puppetSound(3, "Alarm")
  48.   updateStage()
  49.   set temp to 5
  50.   puppetSprite(110, 1)
  51.   repeat while temp > 0
  52.     startTimer()
  53.     repeat while the timer < 60
  54.       nothing()
  55.     end repeat
  56.     set tempName to "DefCon" && temp
  57.     set the member of sprite 110 to tempName
  58.     puppetSound(3, "Alarm")
  59.     updateStage()
  60.     set temp to temp - 1
  61.   end repeat
  62.   startTimer()
  63.   repeat while the timer < 60
  64.     nothing()
  65.   end repeat
  66.   if the runMode = "Author" then
  67.     halt()
  68.   else
  69.     go(1, "CREDITS")
  70.   end if
  71. end
  72.  
  73. on idle
  74.   if the frame = 5 then
  75.     if the timer > (gTimer + 300) then
  76.       SwitchBios()
  77.       set gTimer to the timer
  78.     else
  79.       nothing()
  80.     end if
  81.   end if
  82. end
  83.  
  84. on SwitchBios
  85.   set bioMonitorSprite to 26
  86.   repeat with x = 1 to 6
  87.     if the puppet of sprite bioMonitorSprite = 0 then
  88.       puppetSprite(bioMonitorSprite, 1)
  89.     end if
  90.     set newBio to the memberNum of sprite bioMonitorSprite + 1
  91.     if newBio = 9 then
  92.       set newBio to 1
  93.     end if
  94.     set the memberNum of sprite bioMonitorSprite to newBio
  95.     set BioNameSprite to bioMonitorSprite + 18
  96.     if the puppet of sprite BioNameSprite = 0 then
  97.       puppetSprite(BioNameSprite, 1)
  98.     end if
  99.     set newName to the memberNum of sprite BioNameSprite + 1
  100.     if newName = 42 then
  101.       set newName to 34
  102.     end if
  103.     set the memberNum of sprite BioNameSprite to newName
  104.     set bioMonitorSprite to bioMonitorSprite + 1
  105.   end repeat
  106.   updateStage()
  107. end
  108.  
  109. on playRandom
  110.   set thisMember to the member of sprite 24
  111.   set thisType to the type of member thisMember
  112.   case thisType of
  113.     #digitalVideo:
  114.       nothing()
  115.     otherwise:
  116.       set temp1 to random(100)
  117.       if temp1 = 100 then
  118.         set temp2 to random(20)
  119.         repeat while temp2 = gLastSound
  120.           set temp2 to random(20)
  121.         end repeat
  122.         set gLastSound to temp2
  123.         if not soundBusy(2) then
  124.           puppetSound(2, "Sound" && string(temp2))
  125.         end if
  126.       end if
  127.   end case
  128. end
  129.